#include <iostream>
using namespace std;
#include "sendc.h"
using namespace sendc;


class Foo : public Signals {
public:
    int a;
    Foo() : a(0) {}
    void foo(int a, Foo* b, string c) {
        cout << "Foo::foo " << a << c << endl;
        b->a = a;
    }
};

void bar(int a, Foo*b, string c) {
    cout << "bar " << a << c << endl;
    b->a = a+1;
}

int main() {
    Foo foo;
    foo.add_signal<void, int, Foo*, string>("boh");
    foo.connect("boh", &foo, &Foo::foo);
    foo.connect("boh", bar);
    foo.emit<void, int, Foo*, string>("boh", 7, &foo, "sperem");
    cout << foo.a << endl;
    return 0;
}
